import 'base_model.dart';

/// 基础实体
class PrizeNoticeModel extends BaseModel {
  List<PrizeNoticeItemModel> list = [];
  PrizeNoticeModel.fromList(List res) {
    if (res != null) {
      res.forEach((v) {
        list.add(new PrizeNoticeItemModel.fromJson(v));
      });
    }
  }

  PrizeNoticeModel.fromJson(Map<String, dynamic> data);

  @override
  Map<String, dynamic> toJson() {
    return {};
  }
}

class PrizeNoticeItemModel {
  int uid;
  String uname;
  String uheadImage;
  int cash;

  PrizeNoticeItemModel.fromJson(Map<String, dynamic> data) {
    uid = data['uid'] ?? 0;
    uname = data['uname'] ?? '';
    uheadImage = data['uhead_image'] ?? '';
    cash = data['cash'] ?? 0;
  }

  Map<String, dynamic> toJson() {
    return {'uid': uid, 'uname': uname, 'uheadImage': uheadImage, 'cash': cash};
  }
}
